
package com.idealighter.game.bank.handler;

import com.google.inject.Inject;

import com.idealighter.game.bank.manager.BankMgr;
import com.idealighter.game.bank.message.ReqTransferGoldRecordMsg;
import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.Bank.TRANSFER_GOLD_RECORD)
public class ReqTransferGoldRecordHandler implements ReqMessageHandler {

  @Inject
  private BankMgr bankMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqTransferGoldRecordMsg msg = (ReqTransferGoldRecordMsg) message;
    Byte opposizeType = null;

    return bankMgr.transferGoldList(player, msg.getRecordId(), msg.isNext(), opposizeType);
  }
}
